extends Node

@export var click_sfx:AudioStream
@export var hover_sfx:AudioStream

func _ready():
	make_connection()
	
func make_connection():
	var connect_target = get_parent()
	if connect_target is Button:
		connect_target.mouse_entered.connect(mouse_entered_handler)
		connect_target.pressed.connect(pressed_handler)
		
func mouse_entered_handler():
	AudioManager.play_sfx(hover_sfx,true)
	
func pressed_handler():
	AudioManager.play_sfx(click_sfx, true)
